using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace GameTank
{
    public class MyGamePad : InvisibleGameEntity
    {
        Button left, up, right, down, select, a, esc;

        internal Button Esc
        {
            get { return esc; }
            set { esc = value; }
        }

        internal Button A
        {
            get { return a; }
            set { a = value; }
        }

        internal Button Select
        {
            get { return select; }
            set { select = value; }
        }

        internal Button Down
        {
            get { return down; }
            set { down = value; }
        }

        internal Button Right
        {
            get { return right; }
            set { right = value; }
        }

        internal Button Up
        {
            get { return up; }
            set { up = value; }
        }

        internal Button Left
        {
            get { return left; }
            set { left = value; }
        }
        public MyGamePad()//:
            //base( game)
        {
            //left = new Button(game,texture2, new Vector2(0, 300));
            //up = new Button(game, texture2, new Vector2(60, 240));
            //right = new Button(game,texture2, new Vector2(120, 300));
            //down = new Button(game,texture2, new Vector2(60, 360));

            left = new Button( Keys.Left);
            up = new Button(  Keys.Up);
            right = new Button(  Keys.Right);
            down = new Button(  Keys.Down);
            esc = new Button(  Keys.Escape);
            a = new Button(  Keys.A);
            select = new Button( Keys.Enter);

            //Texture2D t = game.Content.Load<Texture2D>("ButtonS");
            //select = new Button (game, t, new Vector2(700, 200));
            //t = game.Content.Load<Texture2D>("ButtonA");
            //a = new Button(game, t, new Vector2(700, 370));
            //t = game.Content.Load<Texture2D>("ButtonESC");
            //esc = new Button(game, t, new Vector2(20, 20));
        }

        public override void Update(GameTime gameTime)
        {
            left.Update(gameTime);
            up.Update(gameTime);
            right.Update(gameTime);
            down.Update(gameTime);
            select.Update(gameTime);
            a.Update(gameTime);
            esc.Update(gameTime);
            base.Update(gameTime);
        } 
    }
}
